#pragma once

#define ElementType int

struct StackRecord;
typedef struct StackRecord* Stack;

int IsEmpty(Stack S);
int IsFull(Stack S);
Stack CreateStack(int);
void DisposeStack(Stack S);
void MakeEmpty(Stack S);

void Push(ElementType x, Stack S);
ElementType Pop(Stack S);
ElementType Top(Stack S);

void TestStack();
